﻿<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0,user-scalable=no, maximum-scale=1.0" />
    <title>法律查询</title>
    <link rel="stylesheet" type="text/css" href="/css/common.css" />
    <link rel="stylesheet" type="text/css" href="/css/index.css" />
    <link rel="stylesheet" type="text/css" href="/css/pullToRefresh.css" />
    <!--<link rel="stylesheet" type="text/css" href="css/idangerous.swiper2.7.6.css" />
    <link rel="stylesheet" type="text/css" href="css/idangerous.swiper.3dflow.css" />-->
</head>

<body class="bg_ef">
    <div class="container">
        <div class="header">
            <div class="headbg"><a href="/index.html" class="return"></a></div>
            <p>法律列表</p>
        </div>
    </div>
    <div class="main main_mar" id="wrapper">
        <!--<p class="lab_title">知识点类型：针对不同知识点单独训练</p>-->
        <ul class="laws" id="lawUl"></ul>

    </div>
</body>

</html>
<script type="text/javascript" src="/lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="/lib/layer/2.1/layer.js"></script>
<script type="text/javascript" src="/lib/laypage/1.2/laypage.js"></script>
<script type="text/javascript" src="/lib/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="/lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="/static/h-ui/js/H-ui.js"></script>
<script type="text/javascript" src="/static/h-ui.admin/js/H-ui.admin.js"></script>
<script src="/static/usi/core.js"></script>
<script src="/static/usi/tools.js"></script>
<script src="/js/iscroll.js"></script>
<script src="/js/pullToRefresh.js"></script>
<script>
    refresher.init({
        id: "wrapper",
        divId: "scroller",
        pullUpAction: Load,
        pullDownAction: Refresh,
    });

    function Refresh() {
        myScroll.refresh();
    }
    function Load() {
        if (isData) {
            vcurrentPage = vcurrentPage + 1;
            LoadNewsData();
            myScroll.refresh();
        } else {
            myScroll.refresh();
        }
    }
    var vcurrentPage = 1;
    window.onload = function () {
        LoadNewsData();
    }
    var isData = true;
    function LoadNewsData() {
        jQuery.usi.core.get(ip + api + "/GetNewsData", { whereValue: "", currentPage: vcurrentPage, pageSize: 2, type: 8 }, true, function (data) {
            if (!jQuery.usi.core.isNullOrEmpty(data.data)) {
                $.each(data.data, function (index, item) {
                    var li = $('<li></li>');
                    var a = $('<a href="#"></a>');
                    var p1 = $('<p class="exam_title">' + (jQuery.usi.core.isNullOrEmpty(item.title) ? "" : item.title) + '</p>');
                    var p2 = $('<p class="exam_p"><span class="lab">发布时间:</span>' + (jQuery.usi.core.isNullOrEmpty(item.releaseTime) ? "" : jQuery.usi.core.formatDate(item.releaseTime)) + '</p>');
                    a.bind("click", function () {
                        window.location.href = "lawDetail.html?Unid=" + item.unid;
                    });
                    a.append(p1).append(p2);
                    li.append(a);
                    $("#lawUl").append(li);
                });
            } else {
                isData = false;
            }
        });
       
    }

</script>